﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Media3D;

namespace ObjectEditor.Display3D
{   
    public interface IWorldModel3DProvider
    {
        event EventHandler<ModelChangedEventArgs> ModelChanged;
        event EventHandler<CameraChangeEventArgs> RequestCameraChange;
        ModelVisual3D Model3D { get; }        

        void UserClicked(Point3D point,AppInformation info);
        void ConstrainView(ViewConstraints constraints);
    }

    public class ViewConstraints
    {
        public ViewConstraints()
        {
            MinZ = MaxZ = MinY = MaxY = MinX = MaxX = null;
        }

        public double? MaxX { get; set; }
        public double? MinX { get; set; }
        public double? MaxY { get; set; }
        public double? MinY { get; set; }
        public double? MaxZ { get; set; }
        public double? MinZ { get; set; }
    }

    public class ModelChangedEventArgs : EventArgs
    {
    }

    public class CameraChangeEventArgs : EventArgs
    {
        public Point3D? LookAtPosition { get; set; }
        public double? LookAtDistance { get; set; }
        public double? LookAtAnimationTimeMs { get; set; }
    }
}
